package com.sslpay.merchant.common.domain;

/**
 * 描述：商户应用平台异常
 *
 * @author ssl
 * @create 2020/05/04 14:41
 */
public class MerchantApplicationException extends Exception {
    private final MerchantApplicationErrorCode errorCode;


    public MerchantApplicationException() {
        super();
        this.errorCode = MerchantApplicationErrorCode.UNKNOWN;
    }

    public MerchantApplicationException(MerchantApplicationErrorCode errorCode) {
        super(errorCode.getMsg());
        this.errorCode = errorCode;
    }


    public MerchantApplicationException(MerchantApplicationErrorCode errorCode, Throwable cause) {
        super(errorCode.getMsg(), cause);
        this.errorCode = errorCode;
    }

    public MerchantApplicationErrorCode getErrorCode() {
        return errorCode;
    }
}
